#ifndef _SORT_H_
#define _SORT_H_

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "../../exam/lib.h"

typedef int (*data_cmp_fun)(void *a,void *b);
typedef RET (*sort_fun)(void** array, size_t nr, data_cmp_fun cmp);
RET bubble_sort(void ** data,size_t data_len,data_cmp_fun cmp );
RET merge_sort(void** array, size_t nr, data_cmp_fun cmp);
RET quick_sort(void** array, size_t nr, data_cmp_fun cmp);
RET  half_seek(void ** data,size_t data_len,data_cmp_fun cmp,void * seek_data,void ** ret_data);
void merge_sort_yxl(int* data,int l,int r,data_cmp_fun cmp);
#endif
